<?php

class CounterController extends Controller
{
	/**
	 * @var string the default layout for the views. Defaults to 'column2', meaning
	 * using two-column layout. See 'protected/views/layouts/column2.php'.
	 */
	public $layout='column2';
	public $defaultAction='admin';

	/**
	 * @return array action filters
	 */
	public function filters()
	{
		return array(
			array('ESetReturnUrlFilter + admin',),
		);
	}

	/**
	 * Manages all models.
	 */
	public function actionAdmin()
	{
		$model=new Counter('search');
		if(isset($_GET['Counter']))
			$model->attributes=$_GET['Counter'];

		$this->render('admin',array(
			'model'=>$model,
		));
	}

}
